package org.dromara.nav.domain.bo;

import org.dromara.nav.domain.OsCategory;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 开源分类业务对象 os_category
 *
 * @author LSY
 * @date 2025-11-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OsCategory.class, reverseConvertGenerate = false)
public class OsCategoryBo extends BaseEntity {

    /**
     * 分类ID
     */
    @NotNull(message = "分类ID不能为空", groups = { EditGroup.class })
    private Long categoryId;

    /**
     * 父分类ID
     */
    @NotNull(message = "父分类ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentId;

    /**
     * 祖级ID链
     */
    @NotBlank(message = "祖级ID链不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ancestors;

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categoryName;

    /**
     * 分类编码（唯一）
     */
    @NotBlank(message = "分类编码（唯一）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categoryCode;

    /**
     * 图标URL
     */
    private String icon;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sort;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态（0正常 1停用）
     */
    private String status;


}
